package updown.service.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import updown.dao.LogDao;
import updown.domain.Log;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>Title: com.damai.serviceInfo </p>
 * <p>Description:super:操作日志 -  </p>
 *
 * @Author:jiangkaixin
 * @Date:2021/3/10
 * @Version: 1.0
 */
@Slf4j
@Service
public class LogService {
    @Autowired
    private LogDao logDao;

    /***
     * 添加日志
     * @param superLog
     */
    public void add(Log logg) {
        logDao.add(logg);
    }

    /**
     * 获取list 列表
     * @param log
     * @return
     */
    public List<Log> getLogList(Log log) {
        Map<String, Object> map = new HashMap<>();
        map.put("operatorName",log.getOperatorName());
        map.put("operateModule",log.getOperateModule());
        return logDao.getList(map);
    }
}
